package com.amit.jsf;

import java.util.List;
import java.util.Map;

import javax.annotation.PreDestroy;

public class StudentBean {
	
	private String firstname;
	private String lastname;
	private String email;
	private String phone;
	private String dob;
	private int age;
	private Double fee;
	private List<String> courses;
	private Map<String,Long> refs;
	private Address address;
	private Course course;

	
	
	
	public String getFirstname() {
		return firstname;
	}

	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}

	public String getLastname() {
		return lastname;
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getDob() {
		return dob;
	}

	public void setDob(String dob) {
		this.dob = dob;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public Double getFee() {
		return fee;
	}

	public void setFee(Double fee) {
		this.fee = fee;
	}

	public List<String> getCourses() {
		return courses;
	}

	public void setCourses(List<String> courses) {
		this.courses = courses;
	}

	public Map<String, Long> getRefs() {
		return refs;
	}

	public void setRefs(Map<String, Long> refs) {
		this.refs = refs;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	public Course getCourse() {
		return course;
	}

	public void setCourse(Course course) {
		this.course = course;
	}

	public void myInit()
	{
		System.out.println("myInit");
	}
	
      @PreDestroy
	public void myDestroy()
	{
		System.out.println("myDestroy");
	}
      
      public String show()
      {
    	  StudentService ss=new StudentService();
    	  
    	  email=ss.getEmail();
    	  phone=ss.getPhone();
    	  address=ss.getAddress();
    	  
    	  System.out.println("Done");
		return "show";
      }

}
